﻿namespace Facade
{
    internal class PageMaker
    {
        private PageMaker() { }

        public static void MakeWelcomePage(string mailAddr, string fileName)
        {
            var mailProp = Database.GetProperties("maildata");
            var userName = mailProp[mailAddr];
            var writer = new HtmlWriter(new StreamWriter(fileName));
            writer.Title($"Welcome to {userName}'s page!");
            writer.Paragraph($"{userName} 欢迎来到 {userName}的主页。");
            writer.Paragraph(" 等你的邮件哦！ ");
            writer.Mailto(mailAddr, userName);
            writer.Close();
        }
    }
}
